package com.atom.app.mvi

import com.atom.app.mvi.db.ImageDao
import com.atom.app.mvi.db.KingDatabase
import com.atom.app.mvi.net.RetrofitFactory
import com.tencent.mmkv.MMKV

object AppModel {

    val imageDao: ImageDao = KingDatabase.getDatabase(App.getApp()).imageDao()

    val netApi: AppNetApi

    val mmkv: MMKV = MMKV.defaultMMKV()

    init {
        val createRetrofit =
            RetrofitFactory.createRetrofit(Contacts.baseUrl, RetrofitFactory.createClient())
        netApi = createRetrofit.create(AppNetApi::class.java)
    }

}
